home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / prgtools / prtsut53.zip / SU1SRC.ZIP / FDEMO07.PAS < prev    next >
Pascal/Delphi Source File  |  1995-11-23  |  3KB  |  117 lines

  1. unit Fdemo07;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   StdCtrls, Forms, DBCtrls, DB, DBGrids, Mask, DBTables, Grids, ExtCtrls,
  8.   PrnWin, Buttons, Printers, CB_Types, DBPrnWin, CB_MFunc;
  9.  
  10. type
  11.   TForm07 = class(TForm)
  12.     DBGrid1: TDBGrid;
  13.     DBNavigator: TDBNavigator;
  14.     Panel1: TPanel;
  15.     DataSource1: TDataSource;
  16.     Panel2: TPanel;
  17.     Panel3: TPanel;
  18.     Table1: TTable;
  19.     Table2: TTable;
  20.     DataSource2: TDataSource;
  21.     ScrollBox: TScrollBox;
  22.     Label1: TLabel;
  23.     Label2: TLabel;
  24.     Label3: TLabel;
  25.     Label4: TLabel;
  26.     Label5: TLabel;
  27.     Label6: TLabel;
  28.     Label7: TLabel;
  29.     EditCustNo: TDBEdit;
  30.     EditCompany: TDBEdit;
  31.     EditAddr: TDBEdit;
  32.     EditAddr2: TDBEdit;
  33.     EditCity: TDBEdit;
  34.     EditState: TDBEdit;
  35.     EditZip: TDBEdit;
  36.     Preview: TBitBtn;
  37.     Label9: TLabel;
  38.     Table2OrderNo: TFloatField;
  39.     Table2CustNo: TFloatField;
  40.     Table2SaleDate: TDateTimeField;
  41.     Table2ShipDate: TDateTimeField;
  42.     Table2ShipVIA: TStringField;
  43.     Table2Terms: TStringField;
  44.     Table2PaymentMethod: TStringField;
  45.     Table2ItemsTotal: TCurrencyField;
  46.     Table2AmountPaid: TCurrencyField;
  47.     Exit: TBitBtn;
  48.     DBNavigator1: TDBNavigator;
  49.     GroupBox1: TGroupBox;
  50.     Label8: TLabel;
  51.     CheckBox1: TCheckBox;
  52.     RadioButton1: TRadioButton;
  53.     RadioButton2: TRadioButton;
  54.     RadioGroup1: TRadioGroup;
  55.     RadioButton3: TRadioButton;
  56.     RadioButton4: TRadioButton;
  57.     DBPrintWin1: TDBPrintWin;
  58.     procedure FormCreate(Sender: TObject);
  59.     procedure PreviewClick(Sender: TObject);
  60.     procedure ExitClick(Sender: TObject);
  61.   private
  62.     { private declarations }
  63.   public
  64.   end;
  65.  
  66. var
  67.   Form07: TForm07;
  68.  
  69. implementation
  70.  
  71. {$R *.DFM}
  72.  
  73. procedure TForm07.FormCreate(Sender: TObject);
  74. begin
  75.   Table1.Open;
  76.   Table2.Open;
  77. end;
  78.  
  79. procedure TForm07.PreviewClick(Sender: TObject);
  80. var
  81.     y: Real;
  82. begin
  83.    DBPrintWin1.BeginPrint;
  84.    DBPrintWin1.NewFont ('Arial',20,True,True,True);
  85.    DBPrintWin1.SetTheTextColor (RGB(255,0,0));
  86.    DBPrintWin1.DrawText( 1.2,poCenter,'The Customer');
  87.  
  88.    DBPrintWin1.NewFont ('Arial',18,False,False,False);
  89.    DBPrintWin1.SetTheTextColor (RGB(0,0,0));
  90.    DBPrintWin1.DrawWindow( 2.1,poCenter,ScrollBox);
  91.  
  92.  
  93.    y := 5.0;
  94.  
  95.    DBPrintWin1.SelectPen (2, RGB(255,0,0));
  96.  
  97.    DBPrintWin1.NewFont ('Arial',20,True,True,True);
  98.    DBPrintWin1.SetTheTextColor (RGB(255,0,0));
  99.    DBPrintWin1.DrawText( y,poCenter,'The Orders');
  100.  
  101.    DBPrintWin1.SetFrameStyle(frThinThick);
  102.  
  103.    DBPrintWin1.NewFont ('Arial',14,False,True,False);
  104.    DBPrintWin1.SetTheTextColor (RGB(0,0,0));
  105.    DBPrintWin1.DrawWindow( 6.0,poCenter, DBGrid1);
  106.  
  107.    DBPrintWin1.EndPrint;
  108. end;
  109.  
  110.  
  111. procedure TForm07.ExitClick(Sender: TObject);
  112. begin
  113.     Close;
  114. end;
  115.  
  116.  
  117. end.